﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Hangsx.aspx.cs" Inherits="Admin_Hangsx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>.:Cập nhật hãng sản xuất:.</title>
    <link href="../CSS/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <table cellpadding="4" cellspacing="0" style="width: 100%; text-align: left;">
            <tr>
                <td class="head" colspan="3">
                    CẬP NHẬT HÃNG SẢN XUẤT</td>
            </tr>
            <tr>
                <td width="15%">
                    Tên hãng</td>
                <td>
                    <asp:TextBox ID="txttenhang" runat="server" Width="95%"></asp:TextBox>
                </td>
                <td width="35%">
                    <asp:Button ID="btnthem" runat="server" CssClass="ica" Text="Thêm" 
                        onclick="btnthem_Click" />
                    <asp:Button ID="btnboqua" runat="server" CssClass="icc" Text="Bỏ qua" 
                        onclick="btnboqua_Click" />
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    Danh sách hãng</td>
            </tr>
            <tr>
                <td colspan="3">
                    <asp:GridView ID="grvds" runat="server" AutoGenerateColumns="False" 
                        EnableModelValidation="True" Width="100%" DataSourceID="dshang">
                        <Columns>
                            <asp:TemplateField HeaderText="STT">
                                <ItemStyle HorizontalAlign="Center" Width="3%" />
                                <ItemTemplate><%#Container.DataItemIndex+1 %>
                                    <asp:Label ID="lbtenhang" runat="server" Text='<%# Eval("tenhang") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Tên hãng">
                            <ItemTemplate>
                                <asp:Label ID="lbten" runat="server" Text='<%#Eval("tenhang") %>'></asp:Label></ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:ImageButton ID="imgsua" runat="server" 
                                        CommandArgument='<%# Eval("id_row") %>' 
                                        ImageUrl="~/images/Testing/pencil_16.png" onclick="imgsua_Click" />
                                    <asp:ImageButton ID="imgxoa" runat="server" 
                                        CommandArgument='<%# Eval("id_row") %>' 
                                        ImageUrl="~/images/Testing/delete_16.png" onclick="imgxoa_Click" 
                                        onclientclick="return confirm('Bạn có chắc muốn xóa?')" />
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" Width="7%" />
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <asp:SqlDataSource ID="dshang" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                        SelectCommand="SELECT * FROM [HangSX]"></asp:SqlDataSource>
                </td>
            </tr>
        </table>
    
    </div>
    <asp:Label ID="lbid" runat="server" Visible="False"></asp:Label>
    </form>
</body>
</html>
